<html>
    <#include "../common/header.ftl">
<body>
<div id="wrapper" class="toggled">
    <#--边栏-->
    <#include "../common/nav.ftl">

    <#--主要内容-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="container">
                <div class="row clearfix">
                    <div class="col-md-12 column">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>
                                    订单编号
                                </th>
                                <th>
                                    订单总金额
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>
                                ${orderDTO.getOrderId()}
                                </td>
                                <td>
                                ${orderDTO.getOrderAmount()}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>

                <#--订单详情表数据-->
                    <div class="col-md-12 column">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>
                                    商品编号
                                </th>
                                <th>
                                    商品名称
                                </th>
                                <th>
                                    价格
                                </th>
                                <th>
                                    数量
                                </th>
                                <th>
                                    总额
                                </th>
                            </tr>
                            </thead>
                            <tbody>
                    <#list orderDTO.getOrderDetailList() as details>
                    <tr>
                        <td>
                            ${details.getProductId()}
                        </td>
                        <td>
                            ${details.getProductName()}
                        </td>
                        <td>
                            ${details.getProductPrice()}
                        </td>
                        <td>
                            ${details.getProductQuantity()}
                        </td>
                        <td>
                            ${details.getProductPrice() * details.getProductQuantity()}
                        </td>
                    </tr>
                    </#list>
                            </tbody>
                        </table>
                    </div>

                    <div class="col-md-12 column">
                <#if orderDTO.getOrderStatusEnum().getMsg() == "新订单">
                    <a type="button" class="btn btn-default btn-primary"
                       href="/seller/order/finish?orderId=${orderDTO.getOrderId()}">完结订单</>

                    <a type="button" class="btn btn-default btn-danger"
                       href="/seller/order/cancel?orderId=${orderDTO.getOrderId()}">取消订单</a>

                </#if>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>